package com.example.shilehui;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.ImageView;
import android.widget.TextView;

public class ReceiptRecentInfoActivity extends Activity {
	
	private TextView _titleTextView;
	private ImageView _backImageView;
	private TextView _titleRightTextView;
	private ImageView _titleRightImageView;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		ini();
		
	}
	
	
	private void ini(){
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.receipt_recent_info_layout);
		setTitleStyle();
		
	}
	
	private void setTitleStyle(){
		_titleTextView=(TextView)findViewById(R.id.title_middle);
		 _backImageView=(ImageView)findViewById(R.id.title_left_imageview);
		 _titleRightTextView=(TextView)findViewById(R.id.title_right_textview);
		 _titleRightImageView=(ImageView)findViewById(R.id.title_right_imageview);
		 
		 
		 _titleTextView.setText(R.string.receipt_recent_info);
		 _titleTextView.setTextColor(Color.WHITE);
		 _titleTextView.setTextSize(18);
		 _titleTextView.setGravity(Gravity.CENTER);
		 
		 
		 _backImageView.setImageResource(R.drawable.left_icon);
		 _backImageView.setOnClickListener(new onViewClickListener());
		 _titleRightImageView.setVisibility(View.GONE);
		 _titleRightTextView.setVisibility(View.GONE);
	}
	
	 private class onViewClickListener implements OnClickListener{

			@Override
			public void onClick(View v) {
				switch(v.getId()){
					case R.id.title_left_imageview:
						finish();
						break;
				}
				
			}
			 
	}
}
